// 长者信息type

export type FormValidateResultType = Record<string, string | number | (string | number)[]>

// 表单 props
export interface FormProps {
	readonly?: boolean
	add?: boolean
	validateInfos: any
	formState: AllFormFields
}

// 基础信息
export interface BaseFormField {
	name: string,
	card: string,
	checkDate: string,
	sex: number,
	addr?: string,
	birth: string,
	emergencyName: string,
	emergencyPhone: string,
	age?: number,
	avatar: string,
	maritalStatus?: number,
	interest?: string,
}

// 健康信息
export interface BodyFormField {
	pastMedicalHistory?: string,
	surgicalHistory?: string,
	drugAllergyHistory?: string,
	allergen?: string,
	dietaryTaboos?: string,
	smoke?: number,
	drink?: number,
}

// 体检
export interface ExamingFormField {
	height?: string,
	weight?: string,
	vision: number,
	hearing: number,
	skinCondition: number,
	blooPressure?: string,
	bloodLipids?: string,
	bloodSugar?: string,
	heartRate?: string,
	capability: number,
	cognitive: number,
	careLevel?: number,
	packages: number[]
}

// 入住信息
export interface CheckFormField {
	checkInDate: string | undefined,
	room: number[],
	roomName?: string,
	checkInMethod: number,
	payMethod: number,
	reimbursementRatio?: string
}

// 表单 fields
export type AllFormFields = BaseFormField & BodyFormField & ExamingFormField & CheckFormField

// 表单 fields
export type FormFields = Partial<AllFormFields> & { [key: string]: any };
// export type FormFields = AllFormFields;


// 长者表单提交
export interface AllFormSubmitFields {
	Avatar: string
	Name: string
	IDCard: string
	Sex: number // 0: 女 1:男
	Address: string
	StartTime: string // 入住时间
	MaritalStatus: number   // 0:未婚 1:已婚2:丧偶
	Way: number   // 0:全托 1:日托
	Birthday: string
	Age: number
	Contact: number
	Listening: number // 听力 0:较好1:一般2:较差
	Phone: string
	TenantID: number
	Eyesight: number   // 视力 0:较好1:一般2:较差
	Skin: number   // 皮肤情况 0:较好1:一般2:较差
	Disabled: number   // 是否残疾
	MedicalHistory: string // 病史
	Hobby: string // 兴趣爱好
	SurgeryHistory: string // 手术史
	DrugAllergyHistory: string // 药物过敏史
	Allergen: string // 过敏源
	DietaryTaboos: string // 饮食禁忌
	Smoking: number   // 0:不吸烟1:吸烟
	Drink: number   // 0:不喝酒 1:喝酒
	Height: string
	Weight: string // 体重
	BloodPressure: string // 血压
	BloodLipids: string // 血脂
	BloodSugar: string // 血糖
	HeartRate: string // 心率
	CapabilityAssessment: number   // 能力评估 0:能力完好1:轻度失能2:中度失能3:重度失能
	CognitiveAssessment: number   // 认知评估 0:认知完好1:轻度失智2:中度失智3:重度失智
	CareLevel: number   // 照护等级 0:自理1:介助2:介护三级3:介护二级4:介护一级
	Bed: number  // 床位
	PaymentWay: number   // 0:城镇职工医保 1:城镇居民医保 2:新型农村合作医疗 3:商业保险 4:贫困救助 5:全自费
	ReimbursementRatio: string, // 报销比例
	ID?: number
	FloorID: number,
	BedID: number,
	ApartmentID: number,
	RoomID: number,
	FloorName: string,
	BedName: string,
	ApartmentName: string,
	RoomName: string
	Packages: number[]
}

export type FormSubmitFields = Partial<AllFormSubmitFields>
export type OldListQuery = {
	Offset: number
	Limit: number
}

export interface ApiCommonResponse {
	Code: number
	Message: string
	Data: any
}
